package com.ceba.test.modules.admin.helper;

import com.ceba.base.helper.LoggerHelper;
import com.ceba.cebautils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ceba.test.modules.admin.entity.CustomResource;
import com.ceba.test.modules.admin.entity.QfRule;
import com.ceba.test.modules.admin.logicService.AdminLogicService;

import configs.context.SpringBeans;

public class CustomResourceHelper {
	
	static Logger logger = LoggerFactory.getLogger(CustomResourceHelper.class);
	
	private static AdminLogicService adminLogicService
		= SpringBeans.getAdminLogicService("adminLogicService");

	public static CustomResource getByIdCusResouse(String id){
		CustomResource resource=null;
		try {
			if(!StringUtil.isEmptyString(id)){
				 resource =	adminLogicService.getByIdCusResouse(id);
			}
		} catch (Exception e) {
			LoggerHelper.error(logger, e, "");
		}
		return resource;
		
	}
	
	
	
	public static QfRule getQiFengRuleById(String id){
		QfRule resource=null;
		try {
			if(!StringUtil.isEmptyString(id)){
				resource =	adminLogicService.getQiFengRuleById(id);
			}
		} catch (Exception e) {
			LoggerHelper.error(logger, e, "");
		}
		return resource;
		
	}
	

}
